//
//  LiveDetailController.m
//  ios_news
//
//  Created by Han on 14-6-18.
//  Copyright (c) 2014年 ucoder. All rights reserved.
//

#import "LiveDetailController.h"

@implementation LiveDetailController


- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.navigationController.navigationBarHidden = NO;
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.barTintColor = MAIN_COLOR;
    self.navigationController.navigationBar.translucent = NO;  // 半透明
    
    [self addBackButton];
}


//添加返回按钮
-(void)addBackButton
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.exclusiveTouch = YES;
    button.frame = CGRectMake(0, 0, 44, 44);
    //button.backgroundColor = [UIColor redColor];
    
    [button setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    button.imageEdgeInsets = UIEdgeInsetsMake(0, -30, 0, 0);
    
    [button  addTarget:self action:@selector(backButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *leftButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    self.navigationItem.leftBarButtonItem = leftButtonItem;
}

-(void)backButtonClicked:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}


@end
